﻿using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static AbpEntityFrameworkcore.DbContext.MyUserDbContext;

namespace AbpEntityFrameworkcore.DbContext
{
    public class MyUser : IdentityUser<long>
    {

        public string Moniker {  get; set; }
    }
    public class MyRole : IdentityRole<long>
    {
    }
    public class MyUserDbContext : IdentityDbContext<MyUser, MyRole, long>
    {

     
        public MyUserDbContext(DbContextOptions<MyUserDbContext> options) : base(options)
        {

        }


        protected override void OnModelCreating(ModelBuilder builder)
        {
            base.OnModelCreating(builder);
            builder.Entity<IdentityUser>().ToTable("MyUser").Property(u => u.UserName).HasColumnName("UserName");
        }
    }
}
